// kX Driver / kX Driver Interface / kX Driver Effects Library
// Copyright (c) Eugene Gavrilov and eYagos, 2003-2004.
// All rights reserved

/*
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

// 10kX microcode
// Patch name: 'apsexp_plus'

char *apsexp_plus_copyright="Copyright 1998 E-mu Systems/Creative Technology, Ltd.";
char *apsexp_plus_engine="EMU10K1_A0";
char *apsexp_plus_comment="Expander by eYagos (based on the APS Diet Compressor)";
char *apsexp_plus_created="11/01/2003 ";
char *apsexp_plus_guid="141a09a2-3d0b-11d6-a4c7-8fae6d701846";

char *apsexp_plus_name="APS Expander +";
int apsexp_plus_itramsize=400,apsexp_plus_xtramsize=0;

#ifndef KX_INTERNAL
	#define _ATTACK_TIME	0x8004
	#define _RELEASE_TIME	0x8005
	#define _POST_GAIN_1	0x8009
	#define _POST_GAIN_2	0x800a
	#define _THRESHOLD	0x8006
	#define _RATIO		0x8007

	#define _R_PREDELAY_LW	0x800E
	#define _R_PREDELAY_LR	0x8010
	#define _R_PREDELAY_RW	0x8012
	#define _R_PREDELAY_RR	0x8014
	#endif

dsp_register_info apsexp_plus_info[]={
	{ "in0",0x4000,0x7,0xffff,0x0 },
	{ "in1",0x4001,0x7,0xffff,0x0 },
	{ "SideChain0",0x4002,0x7,0xffff,0x0 },
	{ "SideChain1",0x4003,0x7,0xffff,0x0 },
	{ "out0",0x8000,0x8,0xffff,0x0 },
	{ "out1",0x8001,0x8,0xffff,0x0 },
	{ "mon_gain",0x8002,0x8,0xffff,0x0 },
	{ "STres",0x8003,0x1,0xffff,0x1f },
	{ "STattack",0x8004,0x1,0xffff,0x7f64c494 },
	{ "STrelease",0x8005,0x1,0xffff,0x7ff82435 },
	{ "STthreshold",0x8006,0x1,0xffff,0x656cb0f5 },
	{ "STratio",0x8007,0x1,0xffff,0x5555553a },
	{ "STleveldB",0x8008,0x1,0xffff,0x0 },
	{ "GAIN_I",0x8009,0x1,0xffff,0x1 },
	{ "GAIN_F",0x800a,0x1,0xffff,0x2fab964 },
	{ "tmp1",0x800b,0x3,0xffff,0x0 },
	{ "tmp2",0x800c,0x3,0xffff,0x0 },
	{ "tmp3",0x800d,0x3,0xffff,0x0 },
	{ "delW1",0x800e,0x49,0xffff,0x0 },
	{ "&delW1",0x800f,0xb,0xffff,0x0 },
	{ "delR1",0x8010,0x29,0xffff,0x2 },
	{ "&delR1",0x8011,0xb,0xffff,0x2 },
	{ "delW2",0x8012,0x49,0xffff,0xc8 },
	{ "&delW2",0x8013,0xb,0xffff,0xc8 },
	{ "delR2",0x8014,0x29,0xffff,0xca },
	{ "&delR2",0x8015,0xb,0xffff,0xca },
};

dsp_code apsexp_plus_code[]={
	{ 0x0,0x800b,0x4000,0x2040,0x2040 },
	{ 0x0,0x800c,0x4001,0x2040,0x2040 },
	{ 0x0,0x800e,0x800b,0x2040,0x2040 },
	{ 0x0,0x8012,0x800c,0x2040,0x2040 },
	{ 0x9,0x800b,0x800b,0x800b,0x2040 },
	{ 0x9,0x800c,0x800c,0x800c,0x2040 },
	{ 0xe,0x800b,0x800b,0x204d,0x800c },
	{ 0xc,0x800b,0x800b,0x8003,0x2041 },
	{ 0x9,0x800c,0x800b,0x8004,0x8008 },
	{ 0xa,0x800c,0x2040,0x8005,0x800c },
	{ 0xe,0x8008,0x800b,0x800c,0x8008 },
	{ 0xa,0x800d,0x8008,0x8008,0x8006 },
	{ 0x1,0x800d,0x8008,0x800d,0x204f },
	{ 0x0,0x800d,0x204f,0x800d,0x8007 },
	{ 0xd,0x800d,0x800d,0x8003,0x2040 },
	{ 0x0,0x8002,0x2040,0x800d,0x204c },
	{ 0x0,0x8000,0x2040,0x8010,0x800d },
	{ 0x0,0x8001,0x2040,0x8014,0x800d },
	{ 0x4,0x800b,0x2040,0x8000,0x8009 },
	{ 0x0,0x8000,0x800b,0x8000,0x800a },
	{ 0x4,0x800b,0x2040,0x8001,0x8009 },
	{ 0x0,0x8001,0x800b,0x8001,0x800a },
};


